package com.antu.first.dto;

import com.antu.first.bean.Comment;
import com.antu.first.enums.CommentStateEnum;

import java.util.List;

/**
 * Created by Administrator on 2018/3/6.
 */
public class CommentOperationExecution {

    private int state;

    private String stateInfo;

    private Comment comment;

    private List<Comment> comments;

    private int count;

    /**
     * 操作失败的时候执行的构造函数
     * @param stateEnum
     */
    public CommentOperationExecution(CommentStateEnum stateEnum) {
        this.state = stateEnum.getState();
        this.stateInfo = stateEnum.getStateInfo();
    }

    /**
     * 操作成功的时候执行的构造函数
     * @param stateEnum
     * @param comment
     */
    public CommentOperationExecution(CommentStateEnum stateEnum, Comment comment) {
        this.state = stateEnum.getState();
        this.stateInfo = stateEnum.getStateInfo();
        this.comment = comment;
    }

    /**
     * 操作成功时执行的构造函数
     * @param stateEnum
     * @param comments
     */
    public CommentOperationExecution(CommentStateEnum stateEnum, List<Comment> comments) {
        this.state = stateEnum.getState();
        this.stateInfo = stateEnum.getStateInfo();
        this.comments = comments;
    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

    public String getStateInfo() {
        return stateInfo;
    }

    public void setStateInfo(String stateInfo) {
        this.stateInfo = stateInfo;
    }

    public Comment getComment() {
        return comment;
    }

    public void setComment(Comment comment) {
        this.comment = comment;
    }

    public List<Comment> getComments() {
        return comments;
    }

    public void setComments(List<Comment> comments) {
        this.comments = comments;
    }

    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
    }
}
